#include "sys_time.h"
#include "rcc_apb_periph.h"

sj_void get_localtime(struct sj_time *time)
{
    struct rtc_date date;
    struct rtc_time t;
    peripheral_rtc_get_time(&date,&t);
    time->year =date.year;
    time->month =date.month;
    time->date =date.date;
    time->hours =t.hours;
    time->minutes =t.minutes;
    time->seconds =t.seconds;
    time->week_day =date.weekDay;
}
